﻿/**
* Class:  
* Version: alpha
* Author:  Pavel Jacko
* Date:   18/05/2009
* Description:
* 
*/
package syerit.core.display
{
	import flash.display.Shape;

	public class Border extends Shape
	{
		public function Border (_w:Number,_h:Number,_b:int,_clr:uint)
		{
			init (_w,_h,_b,_clr);
		}
		private function init (width:Number,height:Number,borderWeight:int,borderColor:uint):void
		{
			graphics.beginFill ( borderColor);
			graphics.drawRect (0, 0, width, borderWeight);
			graphics.endFill ();
			graphics.beginFill ( borderColor);
			graphics.drawRect (width-borderWeight, 0, borderWeight, height);
			graphics.endFill ();
			graphics.beginFill ( borderColor);
			graphics.drawRect (0, height-borderWeight, width, borderWeight);
			graphics.endFill ();
			graphics.beginFill ( borderColor);
			graphics.drawRect (0,  0, borderWeight, height);
			graphics.endFill ();
		}
	}
}